package com.cloud.point.designPattern.decorator;

import com.cloud.point.designPattern.decorator.decoratorCategory.GreenDiamond;
import com.cloud.point.designPattern.decorator.decoratorCategory.RedBuff;
import com.cloud.point.designPattern.decorator.decoratorCategory.RedDiamond;
import com.cloud.point.designPattern.decorator.weaponCategory.Staff;
import com.cloud.point.designPattern.decorator.weaponCategory.Sword;

/**
 * @author 24373
 * @description
 * @date 2024/3/30 16:35
 */
public class Test {
    public static void main(String[] args) {

        Weapon sword = new Sword();
        sword = new GreenDiamond(sword);
        sword = new RedBuff(sword);
        System.out.println(sword.damage());
        Weapon staff = new Staff();
        staff = new RedDiamond(staff);
        staff = new GreenDiamond(staff);
        System.out.println(staff.damage());

    }

}
